<template>
  <el-dialog :visible.sync="showPointDialog" :before-close="check" title="备注" width="40%">
    {{ remark }}
  </el-dialog>
</template>

<script>

export default {
  name: 'Watch',
  props: {
    watchDialog: {
      type: Boolean,
      default: false
    },
    watchId: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      showPointDialog: false, // 遮罩
      remark: '' // 备注
    }
  },
  watch: {
    watchDialog(newVal) {
      this.showPointDialog = newVal
    },
    watchId(newVal) {
      this.remark = newVal
    }
  },
  methods: {
    // 回调父组件
    check() {
      this.showPointDialog = false
      this.$emit('closeWatch')
    }
  }
}
</script>

<style scoped>

</style>
